package com.example.initmethoddemo;

import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;


/**
 * @Description: ServletContextAware
 * @author: LiuYC
 * @date: 2021年04月23日 10:49
 */
@Component
public class ApplicationRunListener implements ApplicationListener<ApplicationStartedEvent> {

//    选择方法继承或者实现的idea快捷键
//    Ctrl + I     Ctrl + o      Alt + Insert  图形化操作

    @Override
    public void onApplicationEvent(ApplicationStartedEvent applicationStartedEvent) {
        System.out.println("application run listener ");

    }
}
